package com.lovi.io_.homework;

import java.io.*;

/**
 * 解决编码的问题
 */
public class Test02 {
    public static void main(String[] args) throws IOException {
        String filePath = "D:\\桌面\\test\\test2.txt";
        InputStreamReader ir = new InputStreamReader(new FileInputStream(filePath), "gbk");
        BufferedReader br = new BufferedReader(ir);
        String line = "";
        int no = 0;
        while((line = br.readLine())!=null){
            System.out.println(++no +" "+ line );
        }
        br.close();
    }
}
